#include <stdlib.h>

#include "lib.h"
#include "vobject.h"

typedef struct _CVObjVTable *pCVObjVTable;
struct _CVObjVTable
{
	VOBJVTABLE
} CVObjVTable =
{
	(void (*)(pCVObj))VObjDestructV,
	(uint8 (*)(pCVObj))VObjKindV,
	(bool8 (*)(pCVObj, uint8))VObjIsAV
};

void	
deleteVObj(PVOBJ This)
{
	if (This)
	{
		VFUNC(This, pCVObjVTable, VObjDestruct)(VOBJ(This));
		free(This);
	}
}

uint8	
VObjKind(PVOBJ This)
{
	return VFUNC(This, pCVObjVTable, VObjKind)(VOBJ(This));
}

bool8	
VObjIsA(PVOBJ This, uint8 Kind)
{
	return VFUNC(This, pCVObjVTable, VObjIsA)(VOBJ(This), Kind);
}

void	
VObjDestructV(pCVObj This)
{
	NOTUSED(This);
}

uint8	
VObjKindV(pCVObj This)
{
	return (uint8)VO_UNKNOWN;
}

bool8	
VObjIsAV(pCVObj This, uint8 Kind)
{
	return (bool8)(VO_UNKNOWN == Kind);
}

